﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SBattleEnterCopy extends IMessageBase
    {
        public var fromPlayerInfo:SMiniPlayer;
        public var toPlayerInfo:SMiniPlayer;
        public var battleUid:String;
        public const _type:int = 184;
        public static var _regist:SBattleEnterCopy = new SBattleEnterCopy(true);

        public function SBattleEnterCopy(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SBattleEnterCopy();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.fromPlayerInfo.__write(param1);
            this.toPlayerInfo.__write(param1);
            param1.writeString(this.battleUid);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.fromPlayerInfo = new SMiniPlayer();
            this.fromPlayerInfo.__read(param1);
            this.toPlayerInfo = new SMiniPlayer();
            this.toPlayerInfo.__read(param1);
            this.battleUid = param1.readString();
            return;
        }// end function

    }
}
